
import React, { CSSProperties, FC } from 'react'
import { renderIconDefinitionToSVGElement } from '../helpers'

interface IconProps {
    width?: string
    height?: string
    className?: string
    style?: CSSProperties
}

const AlignCenter: FC<IconProps> = ({
    width = '1em',
    height = '1em',
    className,
    style,
}) => {
    const svgHTMLString = renderIconDefinitionToSVGElement({"icon":{"tag":"svg","attrs":{"viewBox":"64 64 896 896","focusable":"false"},"children":[{"tag":"path","attrs":{"d":"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},"name":"align-center","theme":"normal"}, {
        extraSVGAttrs: { width, height, fill: 'currentColor' }
    });

    return <span 
        style={{
            display: 'flex',
            ...style,
        }} 
        className={className} 
        dangerouslySetInnerHTML={{
            __html: svgHTMLString
        }}>
    </span>
}

export default AlignCenter;